import { Controller } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { Crud } from '@nestjsx/crud';
import { GoodsSpecification } from '../../entities/goods_specification.entity';
import { GoodsSpecificationService } from '../../services/goods-specification/goods-specification.service';

@Crud({
  model:{
    type:GoodsSpecification
  },
  query:{
    join:{
      specification:{
        exclude:["id","sort_order"],
        eager:true
      }
    },
    exclude:["id","goods_id","specification_id"]
  }
})
@ApiTags('goods-specification')
@Controller('api/goods-specification')
export class GoodsSpecificationController {
  constructor(
    public readonly service: GoodsSpecificationService
  ){}
}
